package com.cqgc.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cqgc.entity.User;
import com.cqgc.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

public interface UserService extends IService<User> {


    //根据状态和角色查询全部用户信息，在地址上加state=？&&role=？
    Page<User> findUsersByStatus(Integer state,Integer roleFromToken,Integer role, com.cqgc.entity.Page page);

    //通过id修改角色
    boolean updateById(User user);

    //通过id删除角色，修改state=-1

    boolean deleteById(Integer id);


   //批量删除
   boolean batchUpdateState(int[] id);

    //根据账号查询信息
    User findByAccount(String account);

    //根据公司名查询；
    User findByName(String username);

    Page<User> findByUsername(String username, com.cqgc.entity.Page page,int role);


    public User checkLogin(String account, String password);
    public int getRoleByAccount(String account);
    public int addUser(User user);
    public User getUserByAccount(String account);

}
